
#ifndef __LEYU_CWebKitCtrl_H__
#define __LEYU_CWebKitCtrl_H__

#include "webkit\BrowserAgent.h"

class CWebKitCtrl :
	public CWindowWnd , public CControlUI
{
public:
	CWebKitCtrl();
	~CWebKitCtrl(void);

	LPCTSTR GetWindowClassName() const 
	{ 
		return _T("CWebKitCtrl"); 
	};
	
	virtual void OnFinalMessage(HWND hWnd)
	{
//		delete this;
	};

	bool Initialize(void* param);

	bool SetCtrlPos(void* param);

	void LoadUrl(LPCTSTR url);
	void Navigate(LPCTSTR url);

	void SetVisible(bool bVisible = true);

	
	LRESULT HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
	LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);

	const BrowserAgent* GetBrowserAgent() const;
private:
	BrowserAgent* m_pWebkit;

//	CPaintManagerUI m_pm;
};


#endif /* __LEYU_CWebKitCtrl_H__ */